
Security News
Python Adopts Standard Lock File Format for Reproducible Installs
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
@ngneat/falso
Advanced tools
@ngneat/falso is a JavaScript library that provides a wide range of fake data generators for various types of data. It is useful for testing, prototyping, and development purposes where you need to generate realistic but fake data.
Generate Fake Names
This feature allows you to generate random first and last names, which can be useful for populating user profiles or testing forms.
const { randFirstName, randLastName } = require('@ngneat/falso');
console.log(randFirstName()); // e.g., 'John'
console.log(randLastName()); // e.g., 'Doe'
Generate Fake Addresses
This feature allows you to generate random street addresses, cities, and countries, which can be useful for testing location-based applications.
const { randStreetAddress, randCity, randCountry } = require('@ngneat/falso');
console.log(randStreetAddress()); // e.g., '123 Main St'
console.log(randCity()); // e.g., 'New York'
console.log(randCountry()); // e.g., 'USA'
Generate Fake Dates
This feature allows you to generate random past and future dates, which can be useful for testing date-based functionalities.
const { randPastDate, randFutureDate } = require('@ngneat/falso');
console.log(randPastDate()); // e.g., '2020-01-01T00:00:00.000Z'
console.log(randFutureDate()); // e.g., '2025-01-01T00:00:00.000Z'
Generate Fake Emails
This feature allows you to generate random email addresses, which can be useful for testing email-related functionalities.
const { randEmail } = require('@ngneat/falso');
console.log(randEmail()); // e.g., 'john.doe@example.com'
Generate Fake Phone Numbers
This feature allows you to generate random phone numbers, which can be useful for testing contact forms and phone number validation.
const { randPhoneNumber } = require('@ngneat/falso');
console.log(randPhoneNumber()); // e.g., '(123) 456-7890'
Faker.js is a popular library for generating fake data. It offers a wide range of data types similar to @ngneat/falso, including names, addresses, dates, emails, and phone numbers. However, Faker.js has a larger community and more extensive documentation.
Chance.js is another library for generating random data. It provides a variety of data types and is highly customizable. Compared to @ngneat/falso, Chance.js offers more flexibility in generating complex data structures.
Casual is a library for generating random data with a focus on simplicity and ease of use. It offers a range of data types similar to @ngneat/falso but with a simpler API. Casual is a good choice for quick and easy data generation.
All the Fake Data for All Your Real Needs 🙂
Create massive amounts of fake data in the browser and NodeJS. Tree Shakeable & Fully Typed.
✅ 203 Functions
✅ Tree Shakable
✅ Fully Typed
✅ Factory Functions
✅ Entity Functions
✅ Single and Array Result
🤓 Learn about it on the docs site
Sponsorships aid in the continued development and maintenance of ngneat libraries. Consider asking your company to sponsor ngneat as its core to their business and application development.
Elevate your support by becoming a Gold Sponsor and have your logo prominently featured on our README in the top 5 repositories.
Boost your backing by becoming a Gold Sponsor and enjoy the spotlight with your logo prominently showcased in the top 3 repositories on our README.
Become a bronze sponsor and get your logo on our README on GitHub.
npm i @ngneat/falso
yarn add @ngneat/falso
import { randEmail, randFullName } from '@ngneat/falso';
const user = { email: randEmail(), name: randFullName() };
const emails = randEmail({ length: 10 });
You can specify the length of elements you want to generate. Below is an example of generating 10 emails with length equal or smaller than 20 characters.
const emails = randEmail({ length: 10, maxCharCount: 20 });
You can set your own seed if you want consistent results:
import { rand, seed } from '@ngneat/falso';
seed('some-constant-seed');
// Always returns 2
rand([1, 2, 3, 4, 5]);
// Reset random seed
seed();
npm run c
and choose the right answersFAQs
All the Fake Data for All Your Real Needs
The npm package @ngneat/falso receives a total of 372,646 weekly downloads. As such, @ngneat/falso popularity was classified as popular.
We found that @ngneat/falso demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.